import platform from "@/wlkutils/platform";
import {router} from '@/wlkutils/router';

export default {
    data() {
        return {

        };
    },
	onLoad(options) {
		// #ifdef MP
		if (options?.scene) {
		    let path = uni.$u.pages();
		    path ='/'+ (path[path.length-1]?path[path.length-1].route:'');
			let scene = decodeURIComponent(options.scene);
			let sceneObj = scene.split('-');
			var params = new Object();
			sceneObj.forEach(function (v,k) {
                let arr = v.split("=");
                if (arr.length == 2) {
                    params[arr[0]] = arr[1];
                }
            })
            router.replace({
                path: path,
                query: params
            })
		}
		// #endif
	},
}
